home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / resplfil / rspfind.txt < prev    next >
Encoding:
Text File  |  1998-03-27  |  6.9 KB  |  171 lines

  1. Resplendent Filefind Component
  2. (c) 1998 Resplendence Software Projects
  3. version 1.01,    March 27th 1998
  4. Author : Daniel Terhell
  5. email  : daniel@resplendence.com
  6. website: http://www.resplendence.com
  7.  
  8. Resplendent Filefind Component may be used and distributed freely for
  9. non commercial purposes.
  10.  
  11. A license for use in commercial applications together with the source
  12. code is available for $39.
  13.  
  14. Browse to https://www.regnow.com/softsell/nph-softsell.cgi?item=1192-2
  15. to order Resplendent Filefind Component online with your creditcard over
  16. a highly secure Verisign connection and download the registered product
  17. immediately.
  18.  
  19. LIMITATION OF LIABILITY:
  20.  
  21. IN NO EVENT SHALL WE BE LIABLE FOR ANY INCIDENTAL, CONSEQUENTIAL, OR
  22. PUNITIVE DAMAGES WHATSOEVER ARISING OUT OF USE OF THE USE OF THE
  23. SOFTWARE.  SOME STATES AND COUNTRIES DO NOT ALLOW EXCLUSION OR
  24. LIMITATION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES,
  25. THEREFORE THE ABOVE LIMITATION MAY NOT APPLY TO YOU.
  26.  
  27.  
  28. Product Description:
  29. --------------------
  30. Resplendent File Find is a Delphi 32bit component that allows searching
  31. specified drives,paths and/or files for a text string using a separate thread.
  32.  
  33. History:
  34. --------
  35. version 1.00, Jan 30th 1998: initial version
  36. version 1.01, Mar 27th 1998: fixed a bug in GetFixedDrives,
  37.     GetRamDrives,GetRemoteDrives,GetRemovableDrives and GetCDRomDrives
  38.     that would return corrupted data.
  39.  
  40.  
  41. Installation of the component:
  42. ------------------------------
  43. Start Delphi2, Delphi3 or C++ Builder. Click Component, Install Component,
  44. Browse. Now point to the file RSPFIND.DCU (for Delphi) or RSPFIND.OBJ
  45. (for C++ Builder). The component will appear on a tab called Resplendence.
  46.  
  47. Properties:
  48. -----------
  49. property Drives:  String
  50.     A string specifying the drives to search. Should contain only
  51.     letters. You can eventually use GetFixedDrives, GetRemoteDrives and
  52.     GetRemovableDrives to obtain drive information at runtime to set this
  53.     property. If Directories and/or Files have been specified, then the
  54.     component will search for files that match to these criteria as well.
  55.     Example: RspFind1.Drives:='cde';
  56.  
  57. property Directories:  TStringList
  58.     Specifies in what directory paths the component should search
  59.     recursively. If these paths do not have drive letters specified, then a
  60. search will be tried for each drive.
  61.     For example: if Drives='cde' and Directories is a StringList containing
  62.     'Program Files' then all drives CD and E will be used to search,
  63.     but if drives='cde' and Directories is a StringList containing
  64.     'C:\Program Files', no attempt will be made for drives D and E.
  65.  
  66. property FileMask:   String
  67.     A file specification mask specifying what to look for.
  68.     Example: RspFind1.FileMask:='*.*';
  69.  
  70. property Files:  TStringList
  71.     Specifies in what files to search. If this list is not empty then
  72.     matches will only be found if the filename of the file can be found
  73.     in this list. This is very useful if you want to limit your search to
  74.     a set of files, for instance if you want to make another search on a list
  75.     of found files. Files in this list can eventually include a drive and
  76.     directory specifiers as well.
  77.  
  78. property ContaingText: String
  79.     If this string is not empty then matches will only be found if
  80.     the specified string can be found in the file.
  81.     Example: RspFind1.ContaingText:='Borland';
  82.     will ensure that no files will be found that do not contain this text.
  83.  
  84. property CaseSensitive: Boolean
  85.     Specifies whether or not to ignore the difference between uppercase
  86.     and lowercase characters when performing a search with a specified
  87.     searchstring in ContaingText.
  88.     Example: CaseSensitive:=FALSE will make any nodistinction between
  89.     uppercase and lowercase text.
  90.  
  91. property ThreadPriority: TThreadPriority
  92.     Sets the priority level of the searching thread.
  93.     Example: RspFind.ThreadPriority:=tpIdleTime;
  94.     will only allow the search to be executed when no other process is
  95.     needing any CPU time.
  96.  
  97.  
  98. Event Handlers:
  99. ---------------
  100. property OnFileFoud:
  101.     procedure(Sender:TObject; directory: String; fileinfo: TSearchRec);
  102.  
  103.     Event that occurs as soon as a file is found that matches all specifications
  104.     in FileMask,Drives,Directories,Paths and ContaingText.
  105.     In directory is specified the filepath of the file.
  106.     Fileinfo is of the type TSearchRec and stores information on the
  107.     file that was found, like the filename:
  108.  
  109.     TSearchRec = record
  110.         Time: Integer;            // specifies file time
  111.         Size: Integer;            // specifies file size
  112.         Attr: Integer;            // specifies attributes
  113.         Name: TFileName;          // file is of type String
  114.         ExcludeAttr: Integer;     //
  115.         FindHandle: THandle;      //
  116.         FindData: TWin32FindData; // eventually more info
  117.     See Delphi Help on TSearchRec type for more information.
  118.  
  119. property OnCompleted:  procedure(Sender:TObject);
  120.     Event that occurs as soon as the search has finished and completed
  121.     normally.
  122.  
  123. property OnChangeDirectory:
  124.     procedure(Sender:TObject; directory: String);
  125.     Event that occurs during the search process when a new directory
  126.     is being scanned.
  127.  
  128. Methods:
  129. --------
  130. procedure Start;
  131.      Starts the search. Before calling this method make sure that
  132.      all properties (Drives, Directories, Files, ContaingText ...)
  133.      have been set. Setting properties after calling this method will
  134.      have no result until Start is called again.
  135.      Example: RspFind1.Start;  // starts searching
  136.  
  137. procedure Stop;
  138.      Cancels a search that is in progress. After calling Stop, the
  139.      search can not be continued anymore.
  140.      Example: RspFind1.Stop;   // terminates the search in progress
  141.  
  142. procedure Pause;
  143.      Allows you to temporarily interrupt the search progress. After
  144.      calling Continue the search will carry on.
  145.      Example: RspFind1.Pause;    // pauses the search in progress
  146.  
  147. procedure Continue;
  148.      Allows you to continue the search after Pause has been called.
  149.      Example: RspFind1.Continue; // continues the interrupted search
  150.  
  151. function GetFixedDrives:     String;
  152.      Returns all drives from which the disk cannot be removed in the system.
  153.      For example: RspFind1.Drives:=GetFixedDrives;
  154.      will ensure that no search is performed on non-fixed drives.
  155.  
  156. function GetRemoteDrives:    String;
  157.      Returns a string with the letters of all network drives found in the
  158.      system.
  159.      For example: RspFind1.Drives:=GetRemoteDrives;
  160.      will ensure that no search is performed on non-network drives.
  161.  
  162. function GetRamDrives: String;
  163.      Returns all RAM disks found in the system.
  164.  
  165. function GetRemovableDrives: String;
  166.      Returns all removable drives found in the system.
  167.  
  168. function GetCDRomDrives: String;
  169.      Returns all CDRom drives found in the system.
  170. --------------------------------------------------------------------------
  171.